home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / MUSIC1.PAK / SKIP.WFM < prev    next >
Encoding:
Text File  |  1995-07-18  |  4.0 KB  |  155 lines

  1. ***************************************************************************
  2. *  PROGRAM:      Skip.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.14  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This form allows skipping records in the current view table.
  15. *                It contains a spinbox for that purpose, and 2 buttons that
  16. *                will let you submit the form or cancel the skip.
  17. *
  18. *  PARAMETERS:   None
  19. *
  20. *  CALLS:        Music.qbe     (view of tables, in case none are open)
  21. *                Music.cc      (for custom pushbuttons)
  22. *
  23. *  USAGE:        DO Skip.wfm
  24. *
  25. *******************************************************************************
  26. create session                  && If form run on its own, it should close all its tables
  27. set talk off
  28. set ldcheck off
  29.  
  30. ** END HEADER -- do not remove this line*
  31. * Generated on 06/19/94
  32. *
  33. parameter bModal
  34. local f
  35. f = new SKIPFORM()
  36. if (bModal)
  37.    f.mdi = .F. && ensure not MDI
  38.    f.ReadModal()
  39. else
  40.    f.Open()
  41. endif
  42. CLASS SKIPFORM OF FORM
  43.    Set Procedure to Music.cc Additive
  44.    this.MousePointer =          1
  45.    this.ColorNormal = "B/W"
  46.    this.Width =         45.05
  47.    this.Top =          5.41
  48.    this.Text = "Skip Records"
  49.    this.Left =         18.87
  50.    this.OnSelection = CLASS::ONSELECTION
  51.    this.Height =          5.30
  52.    this.Minimize = .F.
  53.    this.Maximize = .F.
  54.    this.OnOpen = CLASS::ONOPEN
  55.    this.HelpFile = ""
  56.    this.HelpId = ""
  57.    this.ColorNormal = "W"
  58.  
  59.    DEFINE RECTANGLE BORDER OF THIS;
  60.        PROPERTY;
  61.          ColorNormal "W/R",;
  62.          Width         29.07,;
  63.          Top          0.47,;
  64.          Text "",;
  65.          Left         13.43,;
  66.          Height          2.24,;
  67.          Border .T.,;
  68.          BorderStyle          1
  69.  
  70.    DEFINE EMPHASIZEDTEXT SKIPTEXT OF THIS;
  71.        PROPERTY;
  72.          FontBold .F.,;
  73.          Alignment          5,;
  74.          ColorNormal "W+/R",;
  75.          Width          7.99,;
  76.          Top          1.01,;
  77.          Text "Skip",;
  78.          Left         14.79,;
  79.          Height          1.26,;
  80.          Border .F.,;
  81.          FontSize         10.00
  82.  
  83.    DEFINE SPINBOX NUMTOSKIP OF THIS;
  84.        PROPERTY;
  85.          ColorNormal "R/W",;
  86.          Width         14.79,;
  87.          Top          1.01,;
  88.          Left         24.99,;
  89.          Value          0,;
  90.          Height          1.01,;
  91.          Border .T.,;
  92.          ColorHighLight "R/W*",;
  93.          Rangemin       -200.00,;
  94.          Function "C",;
  95.          Picture "99999999999999",;
  96.          Rangemax        200.00
  97.  
  98.    DEFINE IMAGE LOGOIMAGE OF THIS;
  99.        PROPERTY;
  100.          Width         10.71,;
  101.          DataSource "FILENAME SMLMUSIC.BMP",;
  102.          Top          0.50,;
  103.          Left          1.19,;
  104.          Height          4.55
  105.  
  106.    DEFINE OKMBUTTON SKIPOKBUTTON OF THIS;
  107.        PROPERTY;
  108.          Width         14.11,;
  109.          Top          3.47,;
  110.          Left         13.43,;
  111.          Height          1.50
  112.  
  113.    DEFINE CANCELMBUTTON SKIPCANCELBUTTON OF THIS;
  114.        PROPERTY;
  115.          Group .F.,;
  116.          Default .T.,;
  117.          Width         14.11,;
  118.          Top          3.47,;
  119.          ID          0,;
  120.          Left         28.22,;
  121.          Height          1.50
  122.  
  123.    ****************************************************************************
  124.    PROCEDURE OnOpen
  125.    ****************************************************************************
  126.    if empty(dbf())
  127.       set view to music.qbe
  128.    endif
  129.    form.skipCancelButton.SetFocus()
  130.  
  131.    ****************************************************************************
  132.    PROCEDURE OnSelection(controlId)
  133.    ****************************************************************************
  134.  
  135.    if controlId <> 0     && Cancel wasn't selected
  136.       do case
  137.          case eof()
  138.             go bottom
  139.          case bof()
  140.             go top
  141.          otherwise
  142.             skip form.numToSkip.value
  143.       endcase
  144.    endif
  145.    form.Close()
  146.  
  147. ENDCLASS
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.